package com.ruoyi.project.system.item.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.item.mapper.FunctionItemMapper;
import com.ruoyi.project.system.item.domain.FunctionItem;
import com.ruoyi.project.system.item.service.IFunctionItemService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 功能项Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-04
 */
@Service
public class FunctionItemServiceImpl implements IFunctionItemService 
{
    @Autowired
    private FunctionItemMapper functionItemMapper;

    /**
     * 查询功能项
     * 
     * @param id 功能项主键
     * @return 功能项
     */
    @Override
    public FunctionItem selectFunctionItemById(Long id)
    {
        return functionItemMapper.selectFunctionItemById(id);
    }

    /**
     * 查询功能项列表
     * 
     * @param functionItem 功能项
     * @return 功能项
     */
    @Override
    public List<FunctionItem> selectFunctionItemList(FunctionItem functionItem)
    {
        return functionItemMapper.selectFunctionItemList(functionItem);
    }

    /**
     * 新增功能项
     * 
     * @param functionItem 功能项
     * @return 结果
     */
    @Override
    public int insertFunctionItem(FunctionItem functionItem)
    {
        return functionItemMapper.insertFunctionItem(functionItem);
    }

    /**
     * 修改功能项
     * 
     * @param functionItem 功能项
     * @return 结果
     */
    @Override
    public int updateFunctionItem(FunctionItem functionItem)
    {
        return functionItemMapper.updateFunctionItem(functionItem);
    }

    /**
     * 批量删除功能项
     * 
     * @param ids 需要删除的功能项主键
     * @return 结果
     */
    @Override
    public int deleteFunctionItemByIds(String ids)
    {
        return functionItemMapper.deleteFunctionItemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除功能项信息
     * 
     * @param id 功能项主键
     * @return 结果
     */
    @Override
    public int deleteFunctionItemById(Long id)
    {
        return functionItemMapper.deleteFunctionItemById(id);
    }
}
